<template>
    <fieldset>
        <legend>child2组件</legend>
        <h1>child2组件</h1>
        <!-- //注册点击事件 -->
        <button @click="send">兄弟传参到child</button>
    </fieldset>
</template>


<script>

export default{
    data(){
        return{
            j:'随后枪出入龙'
        }
    },
    methods: {
        send2(){
            // 监听传参
            this.$bus.$emit('send2',this.j)
        }
    }
}

</script>

<style scoped>
h1{
    color:darkorchid;
}
</style>